﻿<!doctype html>
<html>
<!-- InstanceBegin template="/Templates/template1.dwt" codeOutsideHTMLIsLocked="false" -->
<head>
<meta charset="utf-8">
<!-- InstanceBeginEditable name="doctitle" -->
<title>新车销售</title>
<!-- InstanceEndEditable -->
<script type="text/javascript" src="../js/common.js"></script>
<script type="text/javascript" src="../js/jquery.pager.js"></script>
<script type="text/javascript" src="../js/gbRst.js"></script>
<script type="text/javascript" src="../js/utils.js"></script>
<script type="text/javascript" src="../js/checkLogin.js"></script>
<script type="text/javascript" src="../js/shopSelecterNew.js"></script>
<script type="text/javascript" src="../js/find.js"></script>
<script type="text/javascript" src="../js/pagination.js"></script>
<link href="../css/style.css" type="text/css" rel="stylesheet" />
<link href="../css/Pager.css" type="text/css" rel="stylesheet" />
<script type="text/javascript" src="../js/brankSelecterNew.js"></script>
<script type="text/javascript" src="../js/carSystemIdSelecterNew.js"></script>
<script type="text/javascript" src="../js/carTypeSelecterNew.js"></script>
<!-- InstanceBeginEditable name="head" -->
<!-- InstanceEndEditable -->
</head>

<body>
<!-- InstanceBeginEditable name="EditRegion3" --> 
<script type="text/javascript" src="../js/manhuaDate.1.0.js"></script> 
<script type="text/javascript">
var _Discout = 1;
var _goodsList = new Array();
var _memberId = null;
var _Discout = null;
var _memberDeposit =  null;
var _memberIntegral =  null;
var _memberId =  null;
var _cashCouponAmount = null;
var copuonDetilId = 0;
var IntegralRule = 0;
var integralVote = 0;
$(function(){
	$('#makeDate').val(getToday())
	$(".allMoney .check_btn").click(function(){
		
		var shopId = getInputValue("shopName");
		var ScheduleTypeId = getInputValue("ScheduleType");
  		if(IsEmpty(shopId)){
  			artError("请先选择店铺")
  			return false;
  		}		
		var giveMoney = $(".giveMoney").html();
		if(giveMoney==0){
			
		}else{
		$("#faceMoney").val(giveMoney)	
		$("#allMoney").val(giveMoney)
		$("#cash").val(0)
		$("#credit").val(0)
		$("#post").val(0)
		$("#check").val(0)
		$("#deposit").val(0)
		$("#Transfer").val(0)
		$("#Replacement").val(0)
		$("#Staging").val(0)
			 $("#fkMoney").val(0)
		
		$("#sk").val(0)
		
		
		addMargin($(".coinHome"))
		$(".coinHome,#yinying1").show();
		if(IsNotEmpty(_memberId)){
			$("#despoitMoney").focus()
		}else{
			$("#coupMoney").focus()
		}
		
		}
	})
	$(".final").each(function(){
		$(this).text(parseFloat($(this).siblings(".theCoin").text())*(1-parseFloat($(".delMoney").text())).toFixed(2));
	})//单类商品总价
	
	$(".addNumber").live("keyup",function(){//修改
		/* var num=$(this).parent("td");
		num.siblings(".final").text(parseFloat(parseFloat($(this).val())*parseFloat(num.siblings(".theCoin").text())*(parseFloat(num.siblings(".delMoney").text()))).toFixed(2));
		num.parents("tbody").find(".final").length;
		var finaly=num.parents("tbody").find(".final") */
		var idName = $(this).attr("id")
		var id=idName.split("_")[1]
		var zk = $("#memberZk_"+id).val()
		var num = $("#goodsNum_"+id).val();
		var price = $("#goodsPrice_"+id).val();
		$("#goodsZk_"+id).html(parseFloat(zk*price).toFixed(2))
		$("#goodsMoney_"+id).html(parseFloat(zk*price*num).toFixed(2));
		getAllMoney();
		
	})//修改数量
	
	
	$(".editZk").live("keyup",function(){//修改折扣或数量
		var num=$(this).parent("td");
		num.siblings(".final").text(parseFloat(parseFloat($(this).val())*parseFloat(num.siblings(".theCoin").text())*(parseFloat(num.siblings(".addNumber").val()))).toFixed(2));
		num.parents("tbody").find(".final").length;
		var finaly=num.parents("tbody").find(".final")

		
	})
	
	
	$("#shopIsChoosed").click(function(){
		if($("#shopIsChoosed").is(":checked")){
			$("#shopName").attr("disabled",false);
			$("#research").attr("disabled",false);
			
		}else{
			$("#shopName").attr("disabled",true);

		}
	});
	
	$(".receivedMoney").change(function(){
		var money = $(this).val()
		money = parseFloat(money);
		if(checkMoney(money)){
			$(this).val(money)
			var cash = parseFloat( getInputValue("cash")).toFixed(2);
			var credit = parseFloat( getInputValue("credit")).toFixed(2);
			var post = parseFloat( getInputValue("post")).toFixed(2);
			var check = parseFloat( getInputValue("check")).toFixed(2);
			var deposit =parseFloat( getInputValue("deposit")).toFixed(2);
			var Transfer =parseFloat( getInputValue("Transfer")).toFixed(2);
			var Replacement =parseFloat( getInputValue("Replacement")).toFixed(2);
			var Staging =parseFloat( getInputValue("Staging")).toFixed(2);
			
			var all=parseFloat(cash)+parseFloat(credit)+parseFloat(post)+ parseFloat(check)+ parseFloat(deposit)+ parseFloat(Transfer)+parseFloat(Replacement)+parseFloat(Staging)
			 $("#fkMoney").val(all)
		}else{
			$(this).val(0)
		}
	})
	$(".needMoney").change(function(){
		var money = $(this).val()
		money = parseFloat(money);
		if(checkMoney(money)){
			$(this).val(money)
			var price = parseFloat( getInputValue("price")).toFixed(2);
			var tax = parseFloat( getInputValue("tax")).toFixed(2);
			var insurance = parseFloat( getInputValue("insurance")).toFixed(2);
			var decoration = parseFloat( getInputValue("decoration")).toFixed(2);
			var checkCar =parseFloat( getInputValue("checkCar")).toFixed(2);
			var Outbound =parseFloat( getInputValue("Outbound")).toFixed(2);
			var serviceAmt =parseFloat( getInputValue("serviceAmt")).toFixed(2);
			var postAmt =parseFloat( getInputValue("postAmt")).toFixed(2);
			var otherAmt =parseFloat( getInputValue("otherAmt")).toFixed(2);
			var all=parseFloat(price)+parseFloat(postAmt)+parseFloat(tax)+parseFloat(insurance)+ parseFloat(decoration)+ parseFloat(checkCar)+parseFloat(Outbound)+parseFloat(serviceAmt)+ parseFloat(otherAmt)
			$("#giveMoney").html(all)
		}else{
			$(this).val(0)
		}
	})
	
	$(".raceMoney").change(function(){
		var allMoney =parseFloat( getInputValue("allMoney")).toFixed(2);
		var wipeZeroAmt = getInputValue("wipeZeroAmt");
		var freeAmt = getInputValue("freeAmt");
		var facemoney = parseFloat(allMoney)- parseFloat(wipeZeroAmt)-parseFloat(freeAmt);
		 $("#faceMoney").val(facemoney.toFixed(2))
		 $("#coupMoney").val(facemoney.toFixed(2))
		 $("#fkMoney").val(facemoney.toFixed(2))
	})
	
	$("#goodsBarcode").keypress(function(event){
		if(event.keyCode==13){
		searchGoods();
		}
	})
	
	$("#sk").keypress(function(event){
		if(event.keyCode==13){
		 var sk = 	$(this).val().replace(/\s/gi,'')
		 var cash = getInputValue("coupMoney");
		 
		 $("#zlMoney").val((parseFloat(sk)- parseFloat(cash)).toFixed(2))
		}
	})
	resetMemberInfo();
	resetRoomInfo()
	getIntegralRule();
})
function getIntegralRule(){
	var dt  = _findInfo("../memberIntRule/find/memberIntegralRuleByName", {'name':'积分抵现','status':1})
	if(IsNotEmpty(dt)&&dt.state==0){
		IntegralRule = _getIntOfJson(0, dt, "RuleID")
		integralVote = _getIntOfJson(0, dt, "IntegralRate");
	}
}

function resetMemberInfo(){
	$("#custName").val("");
	$("#saleUserName").val("")
	$("#mp").val("");
	$("#standNo").val("");
	$("#memo").val("");
	$("#price").val(0);
	$("#tax").val(0);
	$("#insurance").val(0);
	$("#decoration").val(0);
	$("#checkCar").val(0);
	$("#Outbound").val(0);
	$("#serviceAmt").val(0);
	$("#postAmt").val(0)
	$("#otherAmt").val(0);
	restZk();
}

function getAllMoney(){
	var txt=0;
	for(var i=0,txt=0;i<$(".final").length;i++){
	 txt=parseFloat($(".final").eq(i).text())+parseFloat(txt);
	}
	$(".giveMoney").text(txt.toFixed(2));//总价

}

function addGoodsById(id){
	var zk = $("#memberZk_"+id).val()
	var num = parseInt( $("#goodsNum_"+id).val())+1;
	$("#goodsNum_"+id).val(num)
	var price = $("#goodsPrice_"+id).val();
	$("#goodsZk_"+id).html(parseFloat(zk*price).toFixed(2))
	$("#goodsMoney_"+id).html(parseFloat(zk*price*num).toFixed(2));
	getAllMoney();
}

function searchMember(){
	resetMemberInfo();
}

function searchMember(){
		
			var cardno = $("#memberCardNo").val().replace(/\s/gi,'')
			if(IsNotEmpty(cardno)){
				
				getShopMember();
			}else{
				
				resetMemberInfo();
			}	
}

function getShopMember(){//查询会员信息
	var shopId = getInputValue("shopName");
	if(IsEmpty(shopId)){
		artError("请先选择店铺")
		return false;
	}
	var memberCardNo = getInputValue("memberCardNo")
	if($("#memberSelect").val()==1){
	var param = {'shopId':shopId,'memberCardNo':memberCardNo}
	}else if($("#memberSelect").val()==2){
		var param = {'shopId':shopId,'name':memberCardNo}
	}else if($("#memberSelect").val()==3){
		var param = {'shopId':shopId,'license':memberCardNo}
	}
	 memberInfo = _findInfoPost("../shopmember/find/memberDespoist", param)
	if(IsNotEmpty(memberInfo)&&memberInfo.state==0){
		if(memberInfo.result.data.length==0){
			 _Discout = null;
			_cashCouponAmount = null;
			 _memberDeposit =  null;
			resetMemberInfo();
			
			alertErrorMessage("查无此会员")
		}else{
		if(memberInfo.result.data.length==1){
			
		$("#cardNo").val(_getStringOfJson(0, memberInfo, "memberCardNo"));
		$("#levelName").val(_getStringOfJson(0, memberInfo, "levelName"))
		$("#integralAmount").val(_getStringOfJson(0, memberInfo, "integralAmount"))
		$("#customerName").val(_getStringOfJson(0, memberInfo, "customerName"))
		$("#roomNo").val(_getStringOfJson(0, memberInfo, "license"))
		_Discout = _getStringOfJson(0, memberInfo, "discount");
		_memberDeposit = _getStringOfJson(0, memberInfo, "depositAmount")
		_cashCouponAmount = _getStringOfJson(0, memberInfo, "cashCouponAmount")
		_memberIntegral = _getStringOfJson(0, memberInfo, "integralAmount")
		_memberId = _getStringOfJson(0, memberInfo, "id")
		$("#discount").val(_Discout)
		$("#depositAmount").val(_memberDeposit)
		$("#cashCouponAmount").val(_cashCouponAmount)
		restZk()
		}else{
			loadmember(memberInfo)
		}	
		
		}		
	}
	
	$("#memberCardNo").val("");
}

function loadmember(memberInfo){
		$("#memberList").empty()
	for ( var i = 0; i < memberInfo.result.data.length; i++) {
		var htm="<tr>"
			htm+="<td>"+_getStringOfJson(i, memberInfo, "memberCardNo")+"</td>"
			htm+="<td>"+_getStringOfJson(i, memberInfo, "customerName")+"</td>"
			htm+="<td>"+_getStringOfJson(i, memberInfo, "mp")+"</td>"
			htm+="<td>"+_getStringOfJson(i, memberInfo, "integralAmount")+"</td>"
			htm+="<td>"+_getStringOfJson(i, memberInfo, "depositAmount")+"</td>"
			htm+="<td>"+_getStringOfJson(i, memberInfo, "cashCouponAmount")+"</td>"
			htm+="<td>"+_getStringOfJson(i, memberInfo, "License")+"</td>"
			htm+="<td><input type=\"button\"  value=\"选择\" class=\"common_btn\" onclick=\"chooseMember(\'"+_getStringOfJson(i, memberInfo, "License")+"\')\" ></td>"
			htm+="</tr>"
			$("#memberList").append(htm)
	}
	addMargin($("#memberDiv"))
	$("#memberDiv,#yinying1").show();
	
}
function chooseMember(id){
	for ( var i = 0; i < memberInfo.result.data.length; i++) {
		var ids = _getStringOfJson(i, memberInfo, "License")
		if(id==ids){
			$("#cardNo").val(_getStringOfJson(i, memberInfo, "memberCardNo"));
			$("#levelName").val(_getStringOfJson(i, memberInfo, "levelName"))
			$("#integralAmount").val(_getStringOfJson(i, memberInfo, "integralAmount"))
			$("#customerName").val(_getStringOfJson(i, memberInfo, "customerName"))
			$("#roomNo").val(_getStringOfJson(i, memberInfo, "license"))
		_Discout = _getStringOfJson(i, memberInfo, "discount");
			_memberDeposit = _getStringOfJson(i, memberInfo, "depositAmount")
		_memberIntegral = _getStringOfJson(0, memberInfo, "integralAmount")
			_cashCouponAmount = _getStringOfJson(i, memberInfo, "cashCouponAmount")
			_memberId = _getStringOfJson(i, memberInfo, "id")
			$("#discount").val(_Discout)
			$("#depositAmount").val(_memberDeposit)
			$("#cashCouponAmount").val(_cashCouponAmount)
			restZk()
		}
	}
	$("#memberDiv,#yinying1").hide();

}


function restZk(){
	$("#goodsList tbody tr").each(function() {
		/* var zk = IsEmpty(_Discout)?1:_Discout;
		 $(this).find("#").html(zk);
			var price = $(this).find(".theCoin").html()
		 $(this).find(".zkPrice").html((zk*price).toFixed(2) )
		 $(this).find(".final").html((zk*price*$(this).find(".addNumber").val()).toFixed(2) ) */
		 
		 var idName = $(this).attr("id")
		var id=idName.split("_")[1]
		var zk =IsEmpty(_Discout)?1:_Discout;
			$("#memberZk_"+id).val(zk)
		var num = $("#goodsNum_"+id).val();
		var price = $("#goodsPrice_"+id).val();
		$("#goodsZk_"+id).html(parseFloat(zk*price).toFixed(2))
		$("#goodsMoney_"+id).html(parseFloat(zk*price*num).toFixed(2));
		
	})
		getAllMoney();
}


function checkFk(){
	
	var dyqMoney = $("#dyqMoney").val()
	var dyqMoney2 = $("#dyqMoney2").val()
	var voucherTypeId =$("#voucherTypeId").val();
	var voucherTypeId2 =$("#voucherTypeId2").val();
	if(dyqMoney>0){
		if(IsEmpty(voucherTypeId)){
			art.dialog({fixed:true, lock: true,content:"请选择要使用的工时抵用券类型",icon:'question',ok: true})
			return false;
		}		
	}
	
	if(dyqMoney2>0){
		if(IsEmpty(voucherTypeId2)){
			art.dialog({fixed:true, lock: true,content:"请选择要使用的材料抵用券类型",icon:'question',ok: true})
			return false;
		}		
	}
		var faceMoney = getInputValue("faceMoney");
		var fkMoney = getInputValue("fkMoney");
		if(parseFloat( fkMoney) == parseFloat( faceMoney )){
			art.dialog({fixed:true, lock: true,content:"确认收款完成？",icon:'question',ok: function (){
				saveInfo2()
			},cancel:true});
		}else if(parseFloat( fkMoney) < parseFloat( faceMoney )){
			artError("付款不足")
			return false;
		}else if(parseFloat( fkMoney) > parseFloat( faceMoney )){
			art.dialog({fixed:true, lock: true,content:"付款("+fkMoney+")大于实收("+faceMoney+"),是否确定交易？",icon:'question',ok: function (){
				saveInfo2()
			},cancel:true});
		}
		
	
}

function addInfo(){
	
	if(IsNotEmpty(_memberId)){
		var despoitMoney = getInputValue("despoitMoney");
		var djqMoney = getInputValue("djqMoney");
		if(despoitMoney>0||djqMoney>0){
			$("#toPassword,#yinying2").show();
		}else{
			saveInfo2()
		}
	}else{
		saveInfo2()
	}	
	
}


function saveInfo2(){
	var shopId = getInputValue("shopName");
	var makeDate = getInputValue("makeDate");
	var custName = getInputValue("custName");
	var saleUserName = getInputValue("saleUserName");
	var mp = getInputValue("mp");
	var carSystemId = getInputValue("carSystemId");
	var carTypeId = getInputValue("carTypeId");
	var standNo = getInputValue("standNo");
	
	var price = getInputValue("price");
	var tax = getInputValue("tax");
	var insurance = getInputValue("insurance");
	var decoration = getInputValue("decoration");
	var checkCar = getInputValue("checkCar");
	var Outbound = getInputValue("Outbound");
	var serviceAmt = getInputValue("serviceAmt");
	var postAmt = getInputValue("postAmt");
	var otherAmt = getInputValue("otherAmt");
	var saleType = getInputValue("saleType");
	var memo = getInputValue("memo");
/* 	var memo = getInputValue("memo");
 */	
 	var cardNo = getInputValue("cardNo");
	var chkAmt = getInputValue("chkAmt");
	
	var faceMoney = getInputValue("faceMoney");
	var cash = getInputValue("cash");
	var credit = getInputValue("credit");
	var post = getInputValue("post");
	var check = getInputValue("check");
	var deposit = getInputValue("deposit");
	var Transfer = getInputValue("Transfer");
	var Replacement = getInputValue("Replacement");
	var Staging = getInputValue("Staging");

	var heads = new Array("shopId","saleType","carSystemId","carTypeId","VIN","price","tax","insurance","decoration","checkCar","Outbound","factAmt","serviceAmt","otherAmt","customerName","memo","mp","saleMan")
	var datas = new Array(shopId,saleType,carSystemId,carTypeId,standNo,price,tax,insurance,decoration,checkCar,Outbound,faceMoney,serviceAmt,otherAmt,custName,memo,mp,saleUserName)
	var jsonDate= _getJsonParseInsertStr(heads, datas);
	
	var payHead=new Array("deposit", "post","cash","Transfer","Replacement","Staging","credit","checkAmt")
	var payData= new Array(deposit,post,cash,Transfer,Replacement,Staging,credit,check);
	
	var payJsonData = _getJsonParseInsertStr(payHead, payData);

		
	var dt = _insertInfoNoSucceedMessage("../newCarSale/insert/insertInfo", {"data":jsonDate,"pay":payJsonData})
	if(IsNotEmpty(dt)&&dt.state==0){
		var id= getHeadIndexValue(0, dt, "id");
					 art.dialog({fixed:true, lock: true,content:"交易完成,是否打印销售单？",icon:'question',ok:function(){
					 toPrintSaleBill(id)
				 },cancel:true});	
				 resetMemberInfo();
				 resetRoomInfo();
				$(".coinHome,#yinying1").hide();
		
	}
	
}

function toPrintSaleBill(id){
	window.open('printCarSaleBill.html?id='+id)

}



function removeAllGoods(){
	_goodsList = new Array();
	$("#goodsList tbody").empty();
	$("#giveMoney").html(0)
}

function resetRoomInfo(){
	$("#standNo").val("")
	$("#memo").val("")
	$("#roomNo").val("")
	$("#goodsBarcode").val("");
	$('#makeDate').val(getToday())

}
function goodsSelected(goodsId, goodsName, barCode) {
	$("#goodsSelecter").val("barCode");
	$("#goodsBarcode").val(barCode);
	searchGoods();
}

function closePassword(){
	$("#toPassword").hide();
	$("#yinying2").hide()
}

function openCouponList(){
	var shopId =getInputValue("shopName")
	if(IsEmpty(shopId)){
		alert("请选择店铺");
		return fasle;
	}
	openCouponListPanel("couponMoney",_memberId,shopId)
}

function __couponSelected(id,value){
	$("#couponListPanel, #couponListPanel_yinying").hide();
	$("#couponMoney").val(value);
	copuonDetilId = id;
	var coupMoney = parseFloat( getInputValue("coupMoney")).toFixed(2);
	var dyqMoney = parseFloat( getInputValue("dyqMoney")).toFixed(2);
	var dyqMoney2 = parseFloat( getInputValue("dyqMoney2")).toFixed(2);
	var gzMoney = parseFloat( getInputValue("gzMoney")).toFixed(2);
	var despoitMoney =parseFloat( getInputValue("despoitMoney")).toFixed(2);
	var integralMoney =parseFloat( getInputValue("integralMoney")).toFixed(2);
	var djqMoney =parseFloat( getInputValue("djqMoney")).toFixed(2);
	var posMoney =parseFloat( getInputValue("posMoney")).toFixed(2);
	var chkAmt =parseFloat( getInputValue("chkAmt")).toFixed(2);
	var couponMoney =parseFloat( getInputValue("couponMoney")).toFixed(2);
	
	var all=parseFloat(integralMoney)+parseFloat(coupMoney)+parseFloat(couponMoney)+ parseFloat(dyqMoney)+ parseFloat(dyqMoney2)+ parseFloat(gzMoney)+parseFloat(despoitMoney)+parseFloat(djqMoney)+ parseFloat(posMoney)+ parseFloat(chkAmt)
	 $("#fkMoney").val(all)
}

function  __lisenseSelected(lisenseId, lisenseName,mp) {
	$("#roomNo").val(mp)
	closeLisenseListPanel()
}

function openChexi(id){
	var brandId = $("#pinpaiId").val();
	if(IsEmpty(brandId)){
		alertErrorMessage("请先选择品牌");
		return false;
	}
	openCarSystemListPanel(id,brandId)
}

function openChexing(id){
	var carSystemId = $("#carSystemId").val();
	if(IsEmpty(carSystemId)){
		alertErrorMessage("请先选择车系");
		return false;
	}
	openCarTypeListPanel(id,carSystemId)
}
</script>
<div id="memberDiv" class="hideDiv" style="display:none;">
  <div class="closeTop"><span onclick="closeParent($(this))" class="closeThe"><img src="../images/close.png"></span></div>
  <table width="100%" border="0" cellspacing="1" cellpadding="0" class="member_list">
    <caption>
    </caption>
    <thead>
      <tr>
        <th>卡号</th>
        <th>姓名</th>
        <th>手机</th>
        <th>积分</th>
        <th>现金账户</th>
        <th>点金券</th>
        <th>车牌号</th>
        <th>操作</th>
      </tr>
    </thead>
    <tbody id="memberList">
    	
    </tbody>
  </table>
</div>
<div id="yinying1" style="display:none;"></div>
<div id="yinying2" style="z-index: 599"></div>
<div class="hideDiv member_search" id="toPassword" style="z-index: 600" >
  <div class="closeTop"><span onclick="closePassword()" class="closeThe"><img src="../images/close.png"></span></div>
  <p><span>密码：</span>
    <input type="password" id="password" style="width:450px;height:30px;line-height:30px;">
  </p>
  <div class="BottomBtn">
    <input type="button"  value="确定" onclick="saveInfo2()">
    <input type="button"  onclick="closePassword()" value="取消">
  </div>
</div>
<div class="hideDiv coinHome member_search">
  <div class="closeTop"><span onclick="closeParent($(this))" class="closeThe"><img src="../images/close.png"></span></div>
  <p>
    <label><span>应收：</span>
      <input type="text" id="allMoney" readonly>
    </label>
  </p>
  <p style="display: none;">
    <label><span>实收：</span>
      <input type="text" id="faceMoney" value="0"  readonly="readonly">
    </label>
  </p>
  <p style="padding-top: 10px; border-top: 2px solid rgb(220, 220, 220);">
    <label><span>现金付款：</span>
      <input type="text" id="cash" value="0" class="receivedMoney">
    </label>
    <label><span>挂账付款：</span>
      <input type="text" id="credit" value="0"  class="receivedMoney">
    </label>
  </p>
  <p>
    <label><span>POS付款：</span>
      <input type="text" id="post" value="0"  class="receivedMoney">
    </label>
    <label><span>支票付款：</span>
      <input type="text" id="check" value="0"  class="receivedMoney">
    </label>
  </p>
 <p>
    <label><span>抵定金：</span>
      <input type="text" id="deposit" value="0"  class="receivedMoney">
    </label>
    <label><span>转账：</span>
      <input type="text" id="Transfer" value="0"  class="receivedMoney">
    </label>
  </p>
   <p>
    <label><span>置换款：</span>
      <input type="text" id="Replacement" value="0"  class="receivedMoney">
    </label>
    <label><span>分期：</span>
      <input type="text" id="Staging" value="0"  class="receivedMoney">
    </label>
  </p>
  <p ><!-- style="display: none;" --> 
    <label ><span>总付款：</span>
      <input type="text" id="fkMoney" value="0" readonly class="receivedMoney">
    </label>
  </p>
  <p style="padding-top: 10px; border-top: 2px solid rgb(220, 220, 220);">
   <!--  <label><span>收款：</span>
      <input type="text" id="sk" value="0" >
    </label>
    <label><span>找零：</span>
      <input type="text" id="zlMoney" value="0" readonly   class="receivedMoney">
    </label> -->
  </p>
  <div class="BottomBtn">
    <input type="button" value="确认付款" onclick="checkFk()">
  </div>
</div>
<div class="container" id="container">
  <div class="container_R fr">
    <div class="place">店面收银</div> 
    <div class="member_search">
      <p><span>
        <input type="checkbox" id="shopIsChoosed" style="width:auto;height:auto;border:none;">
        店面：</span>
        <select id="shopName" onclick="openShopListPanel(this)" style=";height:20px;" disabled="disabled">
        </select>
        <span>收银日期：</span>
        <input type="text" value="" id="makeDate" class="doubledate">
      </p>
      <p> <span>客户姓名：</span>
        <input type="text" value="" id="custName" class="absoluteTxt">
        <span>电话：</span>
        <input type="text" value="" id="mp" class="absoluteTxt">
      
      </p>
      <p> <span>销售顾问：</span>
        <input type="text" value="" id="saleUserName" class="absoluteTxt">
      
      </p>
      </br>
      <p>
      <span>
      品牌：</span>
        <select id="pinpaiId" onclick="openBrandListPanel('pinpaiId')" >
        </select>
      <span>
       车系：</span>
        <select id="carSystemId" onclick="openChexi('carSystemId')" >
        </select>
        <span>车型：</span>
 	<select id="carTypeId" onclick="openChexing('carTypeId')" >
        </select>      </p>
      <p> <span>VIN：</span>
        <input type="text" value="" id="standNo" class="absoluteTxt">
      
      </p>
      <p>
      <span>
      备注：</span>
            <input type="text" value="" id="memo" class="absoluteTxt">

      </p>
      
      </br>
      <p><span>
       交款类型：</span>
        <select id="saleType" >
        <option value="全款">全款</option>
        <option value="定金">定金</option>
        <option value="置换款">置换款</option>
        <option value="续保">续保</option>
        <option value="补余款">补余款</option>
        </select>
      </p>
      <p><span>
       车价：</span>
        <input type="text" value="0" class="needMoney" id="price" class="absoluteTxt">
        <span>购车税：</span>
        <input type="text" value="0"  class="needMoney" id="tax" class="absoluteTxt">
         <span>保险费：</span>
        <input type="text" value="0"  class="needMoney" id="insurance" class="absoluteTxt">
      </p>
      <p>
      	<span>
     	 装饰：</span>
        <input type="text" value="0"  class="needMoney" id="decoration" class="absoluteTxt">
        <span>验车：</span>
        <input type="text" value="0"  class="needMoney" id="checkCar" class="absoluteTxt">
          <span>出库：</span>
        <input type="text" value="0"  class="needMoney" id="Outbound" class="absoluteTxt">
      </p>
       <p>
      	<span>
     	金融服务费：</span>
        <input type="text" value="0"  class="needMoney" id="serviceAmt" class="absoluteTxt">
        <span>
     	刷卡手续费：</span>
        <input type="text" value="0"  class="needMoney" id="postAmt" class="absoluteTxt">
        <span>其它：</span>
        <input type="text" value="0"  class="needMoney" id="otherAmt" class="absoluteTxt">
      </p>
    </div>
    
   
    <div class="allMoney"><span>总金额(折算后)：</span><strong id="giveMoney" class="giveMoney">0</strong><br>
      <input type="button" class="check_btn common_btn" value="结算" >
    </div>
  </div>
  <div class="fc"></div>
</div>
<!-- 选择抵用券的弹出层-->
<div id="vouchersListPanel_yinying" class="yinying" style="z-index:499;"></div>
		<div  style="z-index:500;" id="vouchersListPanel" class="hideDiv">
			<div style="float: right; margin-bottom: 5px; width: 20px; height: 20px; line-height: 20px; text-align: center; background-color: #eee; margin-bottom: 5px; border: 1px solid #ccc;">
				<span id="vouchersListPanel_close" style="cursor: pointer; font-size: 14px;">X</span>
			</div>
			<div class="bottom_search">
				<div class="serWrapper" >
					<input type="text" id="vouchersListPanel_search" class="txt" >
					<strong class="refresh" onclick="$(this).prev().val('')">清空</strong>
				</div>
				<input type="button" id="vouchersListPanel_search"
				style="width: auto; margin-left: 5px;" value="查询"
				class="common_btn">
			</div>
			<table cellpadding="4" cellspacing="0" border="1" width="100%">
				<thead>
					<tr>
						<th>抵用券Id</th>
						<th>抵用券名称</th>
						<th>操作</th>
					</tr>
				</thead>
				<tbody id="vouchersListPanel_data" ></tbody>
			</table>
			<div id="vouchersPager" class="pager" ></div>
		</div>
<!-- InstanceEndEditable --> 
<!-- 选择 商品名称的弹出层-->
<div id="goodsListPanel_yinying" class="yinying" style="z-index:499;"></div>
<div  style="z-index:500;" id="goodsListPanel" class="hideDiv">
  <div style="float: right; margin-bottom: 5px; width: 20px; height: 20px; line-height: 20px; text-align: center; background-color: #eee; margin-bottom: 5px; border: 1px solid #ccc;"> <span id="goodsListPanel_close" style="cursor: pointer; font-size: 14px;">X</span> </div>
  <div class="bottom_search">
    <div class="serWrapper" >
      <input type="text" id="goodsListPanel_searchName" class="txt" >
      <strong class="refresh" onclick="$(this).prev().val('')">清空</strong> </div>
    <input type="button" id="goodsListPanel_search"
				style="width: auto; margin-left: 5px;" value="查询"
				class="common_btn">
  </div>
  <table cellpadding="4" cellspacing="0" border="1" width="100%">
    <thead>
      <tr>
        <th>商品Id</th>
        <th>商品名称</th>
        <th>商品扫描码</th>
        <th>操作</th>
      </tr>
    </thead>
    <tbody id="goodsListPanel_data" >
    </tbody>
  </table>
  <div id="goodsPager" class="pager" ></div>
</div>
<!-- InstanceEndEditable --> 
<script type="text/javascript" src="../js/header.js"></script> 
<script type="text/javascript" src="../js/left.js"></script> 
<script type="text/javascript" src="../js/footer.js"></script> 
<script type="text/javascript">
addMargin($(".hideDiv"))
clearThis("absoluteTxt");
showTab(7,1);
</script>
</body>
<!-- InstanceEnd -->
</html>
